#ifndef RBN_GENOME_H
#define RBN_GENOME_H

#include "../../rbn/Rbn.h"
using RBN::Rbn;

#include "../Genome.h"

namespace GA {

class RbnGenomeNode;

/* RBN genome */
class RbnGenome : public Genome {
public:
	/* new random */
	static RbnGenome* newRandom(int nInputs, int nNodes, int k);

	/* ctor */
	RbnGenome(const RbnGenome& genome);

	/* dtor */
	~RbnGenome();

	/* copy */
	RbnGenome* copy() const;

	/* crossover */
	Genome* crossover(const Genome& genome) const;

	/* mutate */
	void mutate(double geneMutationProbability);

	/* new RBN */
	Rbn* getNewRbn() const;

private:
	int             _nInputs; /* input count */
	int             _nNodes;  /* node count  */
	RbnGenomeNode** _nodes;   /* nodes       */

	/* ctor */
	RbnGenome(int nInputs, int nNodes, RbnGenomeNode** nodes);
};

} // GA

#endif // RBN_GENOME_H

